Ext.define('Hr.view.depart.EditWindow',{
    extend:'Ext.window.Window',
    alias:'widget.edit',
    width:320,
    height:500,
    renderTo:Ext.getBody(),
    modal:true,
    resizable:false,
    layout:'fit',
    bodyStyle:'background-color:white;background-image:none',
    title:'部门信息编辑',
    items:[{
        xtype:'form',
        id:'form',
        border:false,
        autoScroll:true,
        fieldDefaults: {
                    labelAlign: 'right',
                    labelWidth: 100,
                    msgTarget: 'under'
        },
        defaultType: 'textfield',
        defaults:{
	        margin:"10 0 0 5",
	        width:250
        },
        items:[{
            name:'id',
            id:'id',
            hidden:true
        },{
            fieldLabel:'<font color = red>*</font>&nbsp;部门编号',
            name:'cd',
            allowBlank:false,
            blankText:'“部门编号”必须填写',
            emptyText:'请填写'
        },{
            fieldLabel:'<font color = red>*</font>&nbsp;部门名称',
            name:'name',
            allowBlank:false,
            blankText:'“部门名称”必须填写',
            emptyText:'请填写'
        },{
            fieldLabel:'<font color = red>*</font>&nbsp;部门负责人',
            name:'commander',
            allowBlank:false,
            blankText:'部门编号必须填写',
            emptyText:'请填写'
        },{
            fieldLabel:'<font color = red>*</font>&nbsp;负责人电话',
            name:'phone',
            allowBlank:false,
            blankText:'部门编号必须填写',
            emptyText:'请填写'
        },{
            fieldLabel:'负责人联系地址',
            name:'address'
        },{
            xtype:'textarea',
            height:100,
            fieldLabel:'部门职责描述',
            name:'desc'
        },{
            fieldLabel:'备注',
            name:'comment'
        }],
        buttons:[{
            text:'完成',
            action:'submit',
            icon:'../image/icons/submit.png'
        },{
            text:'取消',
            action:'cancel',
            icon:'../image/icons/cancel.png'
        }]
    }]
    
})